package com.bw.car_module.carlist.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.bw.car_module.carlist.CartValueEntity;

import java.util.List;

import io.reactivex.Maybe;

@Dao
public interface CartDao {

    @Insert
    void insertCart(CartValueEntity cartValueEntity);

    @Query("delete from CartValueEntity")
    void delAllCart();

    @Update
    void updateCart(CartValueEntity cartValueEntity);

    @Delete
    void delCart(CartValueEntity cartValueEntity);

    @Query("select * from CartValueEntity")
    Maybe<List<CartValueEntity>> selCart();

}
